/**
 * 数据分析模块API
 */

import request from './request'

// 基础画像分析
export const getBasicProfileAnalysis = () => {
  return request({
    url: '/analytics/analysis/profile/basic/',
    method: 'get'
  })
}

// 行为画像分析
export const getBehaviorProfileAnalysis = () => {
  return request({
    url: '/analytics/analysis/profile/behavior/',
    method: 'get'
  })
}

// 消费画像分析
export const getConsumptionProfileAnalysis = () => {
  return request({
    url: '/analytics/analysis/profile/consumption/',
    method: 'get'
  })
}

// 用户分群分析
export const getUserSegmentationAnalysis = (params) => {
  return request({
    url: '/analytics/analysis/segmentation/',
    method: 'get',
    params
  })
}

// 获取消费详细分析表格数据
export const getConsumptionTableData = (params) => {
  return request({
    url: '/analytics/analysis/consumption-table/',
    method: 'get',
    params
  })
}
